package com.baofu.paycore.dal.mapper;

import com.baofu.paycore.dal.model.RefundStrategyPriorityDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 退款策略优先级配置信息对象
 *
 * User: xin deng  Date: 16/4/21 ProjectName: paycore Version: 1.0
 */
public interface RefundStrategyPriorityMapper {

    /**
     * 新增退款策略模式信息
     *
     * @param refundStrategyPriorityDO         新增参数对象
     * @return                                   新增记录数
     */
    int insert(RefundStrategyPriorityDO refundStrategyPriorityDO);

    /**
     * 更新退款策略优先级信息
     *
     * @param refundStrategyPriorityDO         更新参数对象
     * @return                                   新增记录数
     */
    int update(RefundStrategyPriorityDO refundStrategyPriorityDO);

    /**
     * 查询退款策略优先级信息
     *
     * @param refundStrategyPriorityDO        查询参数对象
     * @return                                  退款策略信息
     */
    List<RefundStrategyPriorityDO> selectInfo(RefundStrategyPriorityDO refundStrategyPriorityDO);

    /**
     * 分页查询退款策略优先级信息
     *
     * @param bean                      查询参数对象
     * @param beginPage                 开始页
     * @param pageSize                   每页显示数
     * @return
     */
    List<RefundStrategyPriorityDO> selectInfoByPage(@Param("bean")RefundStrategyPriorityDO bean,
                                                    @Param("beginPage") int beginPage,
                                                    @Param("pageSize") int pageSize);

    /**
     * 查询退款策略优先级信息总数
     *
     * @param bean                     查询参数对象
     * @return                         总数
     */
    int selectInfoCount(@Param("bean")RefundStrategyPriorityDO bean);

    /**
     * 删除退款策略优先级信息
     *
     * @param updatedBy                 更新人
     * @param id                        记录Id
     * @return                          删除记录数
     */
    int deleteInfo(@Param("updatedBy")String updatedBy,@Param("id") long id);

    /**
     * 查询退款策略优先级信息
     *
     * @param strategyPriority    查询参数对象
     * @param usableFlag          可用状态
     * @return                    退款策略信息
     */
    List<RefundStrategyPriorityDO> selectByRefundStrategyPriority(@Param("strategyPriority") String strategyPriority,
                                                                  @Param("usableFlag")       String usableFlag);

}
